/*
 * @Author: xws 1043495328@qq.com
 * @Date: 2023-07-12 17:21:05
 * @LastEditors: xws 1043495328@qq.com
 * @LastEditTime: 2023-07-26 11:01:14
 * @FilePath: \vue3-admin-template\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//通过vue-router插件实现模板路由配置
import { createRouter, createWebHashHistory } from 'vue-router'
import { constantRoute } from './routes'
import useUserStore from '@/store/modules/user'
//创建路由器
const router = createRouter({
  //路由模式hash
  history: createWebHashHistory(),
  routes: constantRoute,
  //滚动行为
  scrollBehavior() {
    return {
      left: 0,
      top: 0,
    }
  },
})
// const userStore = useUserStore()  
// const userInfo = await userStore.userInfo();
export default router
